<?php
class InfoTable{
    public $MaxPlayer;
    public $MinPlayer;
   public function __construct($max , $min) {
        $this->MaxPlayer = $max;
        $this->MinPlayer = $min;
    }
    static public function swap($buffer){
        return new InfoTable(DataUtil::readInt16( $buffer ) , DataUtil::readInt16( $buffer ) );
    }
    public function getBinarySize(){
        return 4 ;
    }    
    public function getBinary(){
        $buf = ByteBuffer::allocate( $this->getBinarySize() ) ;
        DataUtil::writeInt16( $buf ,  $this->MinPlayer ) ;
        DataUtil::writeInt16( $buf ,  $this->MaxPlayer ) ;
        return $buf->_array();
    }
}
?>